package  
{
	import net.flashpunk.FP;
	import net.flashpunk.Entity;
	import net.flashpunk.graphics.Tilemap;
	/**
	 * © 2012 TheJavaArcade.com
	 */	
	public class Strength extends Entity {
		public var bar:Tilemap;
		
		public function Strength() {
			bar = new Tilemap(Assets.STR_BAR, 600, 9, 1, 9);
			graphic = bar;
			x = FP.camera.x + 25;
			y = FP.camera.y + 1;
			layer = -5;
		}
		
		public override function update():void {
			for (var i:int = 0; i < GameEngine.fracas.strength*12+1; i++) {
				if (i <= GameEngine.fracas.currentStr)	bar.setTile(i, 0, 0);
				if (i > GameEngine.fracas.currentStr)	bar.setTile(i, 0, 1);
				if (i == GameEngine.fracas.strength * 12 || i==0) bar.setTile(i, 0, 2);
				
				
			}
			
		}
		
	}

}